<?php
class messageAction extends frontAction{
	public function execute(){
		$type = $this->getGetParam('type',service_type::DESIGNER);
		$userID = Tool::_getSession('userID');
		$user = service_user::getByID($userID);
		
		$this->assign('type',$type);
		$this->assign('user',$user);
	}
	public function executePost(){
		$message = $this->getPostParam('message',array());
		if(!empty($message)){
			$dao = new DaoMessage();
			$dao->insert($message);
		}
		jsonReturn(1,'ok');
	}
}
?>
